package cn.qiku.rf.controls
{
	import cn.qiku.rf.manager.RFKeyboardManager;
	import cn.qiku.rf.manager.keyboardClasses.KeySequence;
	import cn.qiku.rf.manager.keyboardClasses.KeyStroke;

	import flash.display.Sprite;

	public class FormPanel extends AbstractPanel
	{
		private var keyManager : RFKeyboardManager;

		public function FormPanel()
		{
			super();

			keyManager = new RFKeyboardManager();
			keyManager.init(this);
			keyManager.registerKeyAction(KeyStroke.VK_ENTER, enterFunction);
			keyManager.registerKeyAction(new KeySequence(KeyStroke.VK_CHN_IME, KeyStroke.VK_ENTER), enterFunction);
		}

		protected function enterFunction() : void
		{
		}

		override public function set skin(_skin : Sprite) : void
		{
			super.skin = _skin;
		}

		override public function bringTop() : void
		{
			super.bringTop();
			this.setFocus();
		}
	}
}